package xiegbeController;




import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.servlet.ModelAndView;



import vo.XiegbeVo;
import dao.XiegbeDao;
@Controller
public class XiegbeView {
	
	@Autowired
	XiegbeDao xdao;

	@Autowired
	HttpServletRequest request;
	

	@RequestMapping(value="/project/community/admin.do")
		
		
		
		
	public ModelAndView exe(XiegbeVo vo  ) throws Exception {
		
		/*int x_id1 = Integer.parseInt(request.getParameter("x_id"));*/
		XiegbeVo xvo =  xdao.selectXiege(vo.getX_id());
		xvo.setX_id(vo.getX_id());
		ModelAndView mv = new ModelAndView();
		mv.addObject("state","admin");   
		mv.addObject("xvo",xvo);
		mv.setViewName("/project/community/community_main.jsp");
		return mv;
	}	
}
